﻿namespace Jim.OA;

/// <summary>
/// 获取授权
/// </summary>
[Sdk("/api/ec/dev/auth/applytoken","获取授权")]
public class OATokenInput : ISdkRequest<OATokenOutput>, ISdkCustomHeader , IOALogin
{
    [JsonIgnore]
    public string Secret { get; set; }

    public SdkDictionary Headers()
    {
        return new SdkDictionary
        {
            { "secret",Secret}
        };
    }
}



public class OATokenOutput : SdkResponse<OATokenData>
{
}

public class OATokenData
{
    /// <summary>
    /// 信息显示类型。默认“none”
    /// </summary>
    public string MsgShowType { get; set; }
    /// <summary>
    /// 响应状态。true:成功,false:失败
    /// </summary>
    public bool Status { get; set; }
    /// <summary>
    /// 认证通过的token信息。（默认30分钟内有效）
    /// </summary>
    public string Token { get; set; }
}


public class OATokenCache
{
    public string AppKey { get; set; }
    public string BaseUrl { get; set; }
    public string Secret { get; set; }
    public string Spk { get; set; }
    public string Cpk { get; set; }
    public string Token { get; set; }
}

